<?php


/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Gmap
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
 
?>
<div class="quicklinks gmaps_categories_quicklinks">
	<ul>
	<?php foreach ($this->categories as $category): ?>
	  <li>
      <?php 
        $attrs = array();
        if ($this->show_photo) {
          $attrs['class'] = 'buttonlink icon_gmap_category';
          if ($category->photo_id) {
            $attrs['style'] = "background-image: url(".$category->getPhotoUrl('thumb.mini').");";
          }
        }
        //print_r($attrs);
        echo $this->htmlLink($category->getHref(), $this->translate($category->getTitle()), $attrs
      );?>
        <?php if ($this->show_details): ?>
          <div class="gmap_category_desc">
            <?php echo $this->radcodes()->text()->truncate($category->getDescription(), $this->descriptionlength); ?>
          </div>
        <?php endif; ?>

	  </li>
	<?php endforeach; ?>
	</ul>
</div>